<?
	// = 0 san pham
	// = 1 rao vat 
	// = 2 tuyen dung 
	
	//vi tri 
	// = 0 ben trai
	// = 1 ben duoi
	//kieu src
	// = 0 image
	// = 1 flash
	if(isset($vitri)){$vitri = $vitri;}else{$vitri = 0;}
	if( isset($qc_kieuchungloai) && isset($qc_id_chungloai) ){
		$rs = $db->query("SELECT * FROM ".$prefix."quangcao WHERE qc_hienthi = 1 AND qc_kieuchungloai = '".$qc_kieuchungloai."' AND qc_id_chungloai = '".$qc_id_chungloai."' AND qc_vitri = '".$vitri."' ORDER BY qc_thutu ASC");
		while($row = $db->fetch_array($rs)){
			$qc_src = $row[qc_src];
			$qc_tieude = $row[qc_tieude];
			$qc_width = $row[qc_width];
			$qc_height = $row[qc_height];
			
			
			$qc_lienket = $row[qc_lienket];
			echo "<div id=\"ads_0\" class=\"item\">";
			if($row[qc_kieu_src] == 0){
				echo "<a target=\"_blank\" href=\"".$qc_lienket."\">" . DisplayImage($qc_src,$qc_width,$qc_height,0," title = '".$qc_tieude."'") . "</a>";
			}else{
				//echo DisplayFlash($qc_src,$width,$qc_height);
				echo flash($qc_src,$qc_lienket,$width,$qc_height);
			}
			echo "</div>";
		}
	}else{die();}
?>